//
//  SearchGoodCCell.m
//  com.modada.new
//
//  Created by ferver7 on 2019/5/28.
//  Copyright © 2019 ferver7. All rights reserved.
//

#import "SearchGoodCCell.h"

@implementation SearchGoodCCell
-(void)setGoodItem:(AppBaseGoodItem *)goodItem
{
    _goodItem = goodItem;
    self.nameLabel.text = goodItem.name;
    [self.iconImage sd_setImageWithURL:[NSURL URLWithString:goodItem.thumbnail] placeholderImage:mImageByName(@"")];
    if (goodItem.lowerPrice) {
        self.priceLabel.text = [NSString stringWithFormat:@"¥%@起",goodItem.lowerPrice];
    }else{
        self.priceLabel.text = [NSString stringWithFormat:@"¥%@起",@"0"];
    }
    self.sellerLabel.text = [NSString stringWithFormat:@"已售%@",goodItem.salesVolume];
    if (goodItem.batchNum) {
        self.qiPiLabel.text = [NSString stringWithFormat:@"%@组起批",goodItem.batchNum];
    }else{
        self.qiPiLabel.text = [NSString stringWithFormat:@"%@组起批",@"0"];
    }
    self.shengyuLabel.text = [NSString stringWithFormat:@"剩余%ld",goodItem.totalStock.integerValue ];
    if ([goodItem.type isEqualToString:@"1"]) {
        self.stateLabel.text = @"专享";
    }else{
        self.stateLabel.text = @"商家";
    }
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
